<?php


namespace app\admin\validate;

use think\Validate;
class AdminValidate extends Validate
{
    protected $rule=[
        'username' =>'require|length:2,15',
        'password'=>'require|alphaNum',
        'captcha_code'=>'require|captcha'
    ];
    protected $field =[
        'username'=>'账号',
        'password'=>'密码',
        'captcha_code'=>'验证码',
    ];
    protected $scene = [
        'admin_login'=>['username','password']
    ];
}